<template></template>
<script>
export default {
  data() {
    return {};
  },
  methods: {
    touziEcharts() {
      let option = {
        xAxis: {
          type: "category",
          boundaryGap: false,
          data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
        },
        yAxis: {
          type: "value"
        },
        series: [
          {
            data: [820, 772, 901, 1054, 1190, 1250, 1260],
            type: "line",
            smooth: true, // 折线变圆滑
            showSymbol: false,
            areaStyle: {
              normal: {
                // 区域颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                  {
                    offset: 0,
                    color: "rgba(255, 110, 110,0.39)"
                  },
                  {
                    offset: 0.34,
                    color: "rgba(255, 110, 110,0.25)"
                  },
                  {
                    offset: 1,
                    color: "rgba(255, 110, 110,0.00)"
                  }
                ])
              }
            },
            itemStyle: {
              normal: {
                lineStyle: {
                  color: "#FF6E6EFF" //改变折线颜色
                }
              }
            }
          }
        ]
      };
    }
  }
};
</script>
<style lang="scss">
   // background: linear-gradient(to right,#b0d3f1,#56B1FF);  // 渐变色
</style>